A “time series” tracks quantity over time. For example, in the case of supply chain management software, a time series for a particular item may be used to track, over time, the quantity that a warehouse has “in stock” for the particular item. Here, the time series would track the “ups and downs” in the quantity of the item in the warehouse in response to various deliveries/shipments of the item to/from the warehouse that occur over time.
A typical supply chain management process involves the accessing of time series data to check into the availability of an item or resource. For example, again using a warehouse example, if a transaction desires to ship “X” amount of a specific item at a certain time, the supply chain management software will “check” to make sure that at least X items will be in the warehouse at that time.
A time series may be organized by specifying a quantity for each of a series of equally extensive time intervals. According to the scale 100A observed in FIG. 1a, quantity is measured along the vertical axis and the time intervals T1, T2, T3, T4, T5, T6 are observed along the horizontal axis. Each time interval can be viewed as a “bucket” that sums together changes made to an item's quantity that arise within the bucket's corresponding time interval.
For example, FIG. 1b shows time series data 100B for an “order” (Order_1) in which an item's quantity is made to: 1) increase by one unit (+1) within bucket T1; 2) increase by two units (+2) within bucket T2; and, 3) increase by three units (+3) within bucket T3. FIG. 1c shows the resulting time series data (TS) if a second order (Order_2) for the item is placed that reduces the item's quantity by one unit (−1) in each of the T2 and T3 time intervals. Here, note the summation of Order_1 and Order_2 yields a net quantity for the item of +1 within time interval T2 and +2 within time interval T3.
FIG. 1d indicates that an order can, conceivably, add and subtract to an item's quantity. Specifically, Order_3 increases the item's quantity by one unit within time interval T2 and decreases the item's quantity by one unit within time interval T3. Again, summing over each of the three orders within their respective buckets, yields a time series (TS) having a quantity of +1 within time interval T1, +2 within time interval T2, and, +1 within time interval T3.
Note that in actual implementation the time interval for each specific bucket may be “open” on one end and “closed” on the other end (e.g., over a time interval of t=x to t=y, the term “time interval” may be any time over a time period of (x,y] or [x,y)). Also, as suggested by the time series (TS) notations observed in FIGS. 1c and 1d (i.e., (T1; +1); (T2; +1); (T3; +2) in FIG. 1c and (T1; +1); (T2; +2); (T3; +1) in FIG. 1d), a time series may be stored as a plurality of time interval/quantity associations.
FIG. 2 shows a particular problem associated with prior art time series implementations. Specifically if, at approximately the same time, two different transactions desire to implement a quantity change at the same time interval, one of the transactions will be permitted to change the time series data while the other will be “blocked” so as to be prevented from doing so. Here, the blocked transaction will have to wait until the non-blocked transaction implements its quantity change to the time interval data before the blocked transaction will be permitted to access and change the time interval's time series data. In this sense, changes to the quantity of a particular time series time interval are made “serially” and not “in parallel”.
FIG. 2 shows the problem schematically. Here, transaction TX_1 201 is permitted to read the quantity #1 for time interval T1 for purposes of making a change to the quantity #1. Transaction TX_2 202 attempts to access and change the same quantity #1 while transaction TX_1 201 still has access to it (e.g., transaction TX_2 attempts to change the quantity #1 at time t2 just after the time t1 that transaction TX_1 was granted access to it). Transaction TX_2 202 is blocked from accessing the quantity #1 because of the earlier access by transaction TX_1 201. By contrast, transaction TX_2 202 is not blocked from another time interval's quantity data (e.g., quantity #2 from time interval T2 at time t3) for purposes of changing it provided no other transaction has already accessed it for purposes of changing it.
Moreover, in the prior art, the overall penalty stemming from a lock is exacerbated because the resolution or granularity of a lock spans across multiple time interval buckets rather than a single time interval bucket. As a consequence, the probability of a transaction being locked out of a time interval is not the probability of an earlier transaction having a need for the same time interval, but rather, the probability of an earlier transaction having a need for any time interval within a range of time intervals about the same time interval.